{extend name="index/base" /}
{block name='title'}My Password Recovery{/block}
{block name='content'}
	
	<div id="mainWrap">
		<div class="container">
			<div class="resetPass py-5">
				
				<div class="restPassMain setEmail">
					<div class="h">Confirm your identity to reset password</div>
					<div class="tips">Enter your email address below and Click the Continue button.</div>
			
					<form id="findpw_form">
						<div class="ipt_t">
							<label class="form-label" for="si-email">Email Address</label>
                            <input class="form-control" type="email" v-model="email" id="si-email" placeholder="" />
						</div>
						<div class="ipt_t"> 
							<el-button type="submit" name="send"  class="form-control pinkBtn" :loading="submitLoading" @click="handleSubmit">Continue</el-button>
						</div>
					</form>

				</div>
			</div>
		</div>
	</div>

{/block}
{block name='script'}

<!-- Vendor scrits: js libraries and plugins-->
<script src="/assets/js/bootstrap.bundle.min.js"></script>
<script src="/assets/js/smooth-scroll.polyfills.min.js"></script>

<script src="/assets/js/swiper.min.js"></script>
<script>

	layui.extend({
	}).use([], function () {
		initVue({
			data: {
				email:'',
				submitLoading:false,
			},
			components: {

			},
			computed: {

			},
			created: function () {

			},
			mounted: function () {

			},
			methods: {
				handleSubmit:function(){
					var that = this;
					this.submitLoading = true
					this.$network("index/forgetEmail", {email:this.email}).then(function (res) {
						that.submitLoading = false
						that.$message.success(res.msg)
						setTimeout(function(){
							location.href="/forgotSendTip.html"
						},1000)
					}).catch(function(err){
						that.submitLoading = false
					})
				},
			},
		})


	})

</script>

{/block}